]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Remove Next button and its references
authorUmang Jain <mailumangjain@gmail.com>
Tue, 14 Jan 2020 15:04:26 +0000 (20:34 +0530)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 12 Feb 2020 19:29:48 +0000 (19:29 +0000)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922

js/gdm/authPrompt.js
js/ui/unlockDialog.js

index 96e9e5559494fd3140313eb79bde43940b0537f6..13458eee5689f7d119645b5ce5f44683cb2494aa 100644 (file)
@@ -178,29 +178,14 @@ var AuthPrompt = GObject.registerClass({
         this._buttonBox.add_child(this.cancelButton);
 
         this._buttonBox.add_child(this._defaultButtonWell);
-        this.nextButton = new St.Button({
-            style_class: 'modal-dialog-button button',
-            button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
-            reactive: true,
-            can_focus: true,
-            label: _("Next"),
-            x_align: Clutter.ActorAlign.END,
-            y_align: Clutter.ActorAlign.END,
-        });
-        this.nextButton.connect('clicked', () => this.emit('next'));
-        this.nextButton.add_style_pseudo_class('default');
-        this._buttonBox.add_child(this.nextButton);
-
-        this._updateNextButtonSensitivity(this._entry.text.length > 0);
 
         this._entry.clutter_text.connect('text-changed', () => {
             if (!this._userVerifier.hasPendingMessages)
                 this._fadeOutMessage();
-
-            this._updateNextButtonSensitivity(this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING);
         });
+
         this._entry.clutter_text.connect('activate', () => {
-            if (this.nextButton.reactive)
+            if (this._entry.reactive)
                 this.emit('next');
         });
     }
@@ -230,15 +215,6 @@ var AuthPrompt = GObject.registerClass({
         this._updateEntry(secret);
         this.setQuestion(question);
 
-        if (secret) {
-            if (this._userVerifier.reauthenticating)
-                this.nextButton.label = _("Unlock");
-            else
-                this.nextButton.label = C_("button", "Sign In");
-        } else {
-            this.nextButton.label = _("Next");
-        }
-
         this.updateSensitivity(true);
         this.emit('prompted');
     }
@@ -429,13 +405,7 @@ var AuthPrompt = GObject.registerClass({
         }
     }
 
-    _updateNextButtonSensitivity(sensitive) {
-        this.nextButton.reactive = sensitive;
-        this.nextButton.can_focus = sensitive;
-    }
-
     updateSensitivity(sensitive) {
-        this._updateNextButtonSensitivity(sensitive && (this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING));
         this._entry.reactive = sensitive;
         this._entry.clutter_text.editable = sensitive;
     }
@@ -466,7 +436,6 @@ var AuthPrompt = GObject.registerClass({
         let oldStatus = this.verificationStatus;
         this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
         this.cancelButton.reactive = true;
-        this.nextButton.label = _("Next");
         this._preemptiveAnswer = null;
 
         if (this._userVerifier)
index 0e01e9aacca63a3b96d676f58e204bdaa6f7207e..d93c289f84b2329a967c1fa2131661b0bd16d341 100644 (file)
@@ -547,7 +547,6 @@ var UnlockDialog = GObject.registerClass({
         this._authPrompt.connect('failed', this._fail.bind(this));
         this._authPrompt.connect('cancelled', this._fail.bind(this));
         this._authPrompt.connect('reset', this._onReset.bind(this));
-        this._authPrompt.nextButton.label = _("Unlock");
 
         this._promptBox.add_child(this._authPrompt);